package com.zy.dp.iterator.example2;

import java.util.Iterator;
import java.util.List;

public class Client
{
	public static void main(String[] args)
	{

		PayManager payManager = new PayManager();
		payManager.calcPay();
		List<PayModel> payList = payManager.getPayList();
		Iterator<PayModel> it = payList.iterator();

		while (it.hasNext())
		{
			PayModel pm = (PayModel) it.next();
			System.out.println(pm);
		}

		SalaryManager salaryManager = new SalaryManager();
		salaryManager.calcSalary();
		PayModel[] pms = salaryManager.getPays();
		for (int i = 0; i < pms.length; i++)
		{
			System.out.println(pms[i]);

		}

	}
}
